U.S. Clean Energy Production Analysis

Author

Frank Dong, Ziyan Di, Jingxi Qiu

How far are we from clean energy?

As the sun rises over a landscape increasingly dotted with solar panels and wind turbines, a question lingers in the air:

How far are we until clean energy? This story begins with a world in transition, where every watt of power generated from renewables represents a step away from the burden of fossil fuels and towards a sustainable future.

The United States’ journey towards clean energy is a story of rapid transformation and significant progress, primarily driven by the expansion of renewable energy sources such as solar and wind energy. The foundation of this transformation is technological progress, significant investment in infrastructure, and supportive policy frameworks that encourage the reduction of greenhouse gas emissions and dependence on fossil fuels.

Current US Monthly Energy Production From Sources

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go

df = pd.read_csv("../data/MER_T01_01.csv")

descriptions = [
    "Total Fossil Fuels Production",
    "Total Renewable Energy Production",
    "Nuclear Electric Power Production"
]
filtered_data = df[(df['Description'].isin(descriptions)) & (~df['YYYYMM'].astype(str).str.endswith('13'))]

filtered_data['Date'] = pd.to_datetime(filtered_data['YYYYMM'], format='%Y%m', errors='coerce')
filtered_data = filtered_data.dropna(subset=['Date'])  # Drop rows where date conversion failed
filtered_data = filtered_data.sort_values('Date')

pivot_data = filtered_data.pivot_table(index='Date', columns='Description', values='Value', aggfunc='sum')

pivot_data 


fig = go.Figure()

fig.add_trace(go.Scatter(
    x=pivot_data.index,
    y=pivot_data['Total Fossil Fuels Production'],
    mode='lines',
    stackgroup='one', 
    name='Total Fossil Fuels Production',
    fillcolor='#AF8260'
))
fig.add_trace(go.Scatter(
    x=pivot_data.index,
    y=pivot_data['Total Renewable Energy Production'],
    mode='lines',
    stackgroup='one',
    name='Total Renewable Energy Production',
    fillcolor='#7ABA78'
))
fig.add_trace(go.Scatter(
    x=pivot_data.index,
    y=pivot_data['Nuclear Electric Power Production'],
    mode='lines',
    stackgroup='one',
    name='Nuclear Electric Power Production',
    fillcolor='#6DB9EF'
))

fig.update_layout(
    title='',
    xaxis_title='Date',
    yaxis_title='Energy Production (Quadrillion Btu)',
    legend_title='Energy Types',
    xaxis_range=['2015-01-01', '2023-12-31'],
    height=400,
)

fig.show()

Please scroll through the figure to see the trend of each source.

  • This figure shows the Monthly Energy Production from fossil, renewable, and nuclear sources in the US.
  • The renewable energy sources are increasing, while the fossil fuel sources are increasing highly due to the high demand for energy.
  • We can find that although renewable energy production keeps increasing, it is still far from the fossil fuel sources, but how about the growth rate?

Data source: U.S. Energy Information Administration, TOTAL ENERGY

Anually Increase Rate of Energy Production from Sources

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go

df = pd.read_csv("../data/MER_T01_01.csv")

descriptions = [
    "Total Fossil Fuels Production",
    "Total Renewable Energy Production",
    "Nuclear Electric Power Production",
    "Total Primary Energy Production"
]
filtered_data = df[(df['Description'].isin(descriptions)) & (~df['YYYYMM'].astype(str).str.endswith('13'))]




filtered_data['Year'] = pd.to_datetime(filtered_data['YYYYMM'], format='%Y%m', errors='coerce').dt.year
filtered_data = filtered_data.dropna(subset=['Year']) 
filtered_data = filtered_data.sort_values('Year')

anual_data = filtered_data.groupby(["Year","Description"]).agg({"Value":"sum"}).unstack()

rate_data = anual_data.pct_change().dropna() * 100
rate_data.drop(2024, inplace=True)

rate_fig = go.Figure()

rate_fig.add_trace(go.Scatter(
    x=rate_data.index,
    y=rate_data[('Value', 'Total Fossil Fuels Production')],
    mode='lines',
    name='Total Fossil Fuels Production',
    fillcolor='#AF8260'
))
rate_fig.add_trace(go.Scatter(
    x=rate_data.index,
    y=rate_data[('Value', 'Total Renewable Energy Production')],
    mode='lines',
    name='Total Renewable Energy Production',
    fillcolor='#7ABA78'
))
rate_fig.add_trace(go.Scatter(
    x=rate_data.index,
    y=rate_data[('Value', 'Nuclear Electric Power Production')],
    mode='lines',
    name='Nuclear Electric Power Production',
    fillcolor='#6DB9EF'
))

rate_fig.add_trace(go.Bar(
    x=rate_data.index,
    y=rate_data[('Value', 'Total Primary Energy Production')],
    name='Total Primary Energy Production',
))

rate_fig.update_layout(
    title='',
    xaxis_title='Date',
    yaxis_title='Increase Rate (%)',
    legend_title='Energy Types',
    xaxis_range=['2015', '2023']  
)

rate_fig.show()

Please scroll through the figure to see the trend of each source.

  • This figure shows the annual increase rate of energy production from fossil, renewable, and nuclear sources in the US, the bar shows the increase rate of total energy production.
  • We can find that the renewable energy sources have a higher growth rate than the fossil fuel sources, which means that the renewable energy sources are increasing faster than the fossil fuel sources.
  • And the nuclear electric production has a relative small increase rate, which means that the nuclear electric production has not changed much in recent years.

Data source: U.S. Energy Information Administration, TOTAL ENERGY

There’s trend to show renewables have potential to replace fossil fuels over next two years

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go

df = pd.read_csv("../data/7e._U.S._Electric_Generating_Capacity.csv", delimiter=',', skiprows=4)

relevant_data = df.iloc[3:][['remove', '2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025']]

relevant_data = relevant_data.loc[:18,:].dropna()
relevant_data.columns = ['Source', '2018', '2019', '2020', '2021', '2022', '2023', '2024',
       '2025']
category_map = ['Natural gas', 'Coal', 'Nuclear', 'Wind', 'Solar', 'Battery storage']


consolidated_data = relevant_data.copy()
temp1 = {k:"" for k in category_map+['Others']}
for idx, row in relevant_data.iterrows():
    if row['Source'] in category_map:
        temp1[row['Source']] = row[1:]
    elif row['Source'] == 'Solar thermal' or row['Source'] == 'Solar photovoltaic':
        if type(temp1['Solar']) == str:
            temp1['Solar'] = row[1:]
        else:
            temp1['Solar'] += row[1:]
    else:
        if type(temp1['Others']) == str:
            temp1['Others'] = row[1:]
        else:
            temp1['Others'] += row[1:]

        

new_data = pd.DataFrame(temp1)
ordered_energy_data = new_data[['Others', 'Battery storage', 'Solar', 'Wind', 'Nuclear', 'Coal', 'Natural gas']]

plt.figure(figsize=(9, 5))

ax1 = plt.subplot(1, 2, 1)
ordered_energy_data.plot(kind='bar', stacked=True, ax=ax1, legend=False)
ax1.set_title('U.S. Electricity Generation by Source (2018-2025)', fontsize=10)
ax1.set_xlabel('Year')
ax1.set_ylabel('Generation (Gigawatts)')

normalized_energy = ordered_energy_data.div(ordered_energy_data.sum(axis=1), axis=0) * 100

ax2 = plt.subplot(1, 2, 2)
normalized_energy.plot(ax=ax2)
ax2.set_title('Share of Total Generation by Source (2018-2025)', fontsize=10)
ax2.set_xlabel('Year')
ax2.set_ylabel('Percentage (%)')
ax2.set_ylim(0, 50)
ax2.legend(title='Energy Source', loc='upper left', bbox_to_anchor=(1, 1))

plt.tight_layout()
plt.show()

  • This figure shows the trend of the US electric generation by source from 2018 to 2025 predicted by the U.S. Energy Information Administration.
  • We can find that the renewable energy sources are increasing, while the fossil fuel sources are decreasing, which means that the renewable energy sources have the potential to replace fossil fuels over the next two years.
  • The most interesting part of the figure is that the solar energy generation is increasing rapidly, which means that the solar energy generation has a high potential to replace fossil fuels. Also we can find that the battery storage is increasing, battery storage is a key technology to support the solar energy generation.
  • As the EIA said, they believe renewables have the potential to replace fossil fuels over the next two years.

Data source: U.S. Energy Information Administration, SHORT-TERM ENERGY OUTLOOK DATA BROWSER

Electric Generation Addiction Plan (2024)

Solar and battery storage to make up 81% of new U.S. electric-generating capacity in 2024

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go




df = pd.read_excel("../data/december_generator2023.xlsx", skiprows=2, sheet_name="Planned")
df = df[df["Planned Operation Year"] == 2024]
df = df[["Planned Operation Month", "Energy Source Code", "Nameplate Capacity (MW)"]]
df["Source"] = df["Energy Source Code"].apply(lambda x: "Solar" if x == "SUN" else "Wind" if x == "WND" else "Natural Gas" if x == "NG" else "Battery Storage" if x == "MWH" else "Other")
df = df[["Planned Operation Month", "Nameplate Capacity (MW)", "Source"]]
df["Nameplate Capacity (GW)"] = df["Nameplate Capacity (MW)"] / 1000
import matplotlib.pyplot as plt
data = df
# Convert 'Planned Operation Month' to integer if necessary
data['Planned Operation Month'] = data['Planned Operation Month'].astype(int)

# Create a pivot table to aggregate the nameplate capacity by month and source
pivot_data = data.pivot_table(
    values='Nameplate Capacity (GW)', 
    index='Planned Operation Month', 
    columns='Source', 
    aggfunc='sum',
    fill_value=0
)

# Sort the columns in the pivot table so that the largest total capacities are at the bottom of the stack
sorted_sources = pivot_data.sum().sort_values(ascending=False).index

# Replot with the sorted order
pivot_data_sorted = pivot_data[sorted_sources]


source_capacity = data.groupby('Source')['Nameplate Capacity (GW)'].sum().sort_values(ascending=False)

# Generate both plots in one figure with a consistent color palette, sharing the legend

# Get unique colors for each source
colors = plt.cm.tab20(range(len(source_capacity)))

# Create figure and axes for the subplots
fig, axs = plt.subplots(1, 2, figsize=(11, 3),)

# Stacked bar plot
pivot_data_sorted.plot(kind='bar', stacked=True, color=colors, ax=axs[0])
axs[0].set_title('US planned electric generation addiction by source(2024)', fontsize=16, fontweight='bold', loc = 'left')
axs[0].set_xlabel('Month')
axs[0].set_ylabel('Nameplate Capacity (GW)')
axs[0].tick_params(axis='x', rotation=0)
axs[0].legend([])

wedges, texts, autotexts = axs[1].pie(
    source_capacity, 
    labels=source_capacity.index, 
    autopct='%1.1f%%', 
    startangle=180, 
    colors=colors, 
    wedgeprops=dict(width=0.55)
)

# Update autopct and label text colors to match the slices
for text, autotext, color in zip(texts, autotexts, colors):
    text.set_color(color)
    autotext.set_color("w")
    
axs[1].set_facecolor('#D3D3D3')
# axs[1].set_title('Total Nameplate Capacity by Source')
axs[1].axis('equal')  # Draw as a circle

total_capacity = source_capacity.sum()
axs[1].text(0, 0, f'Total\n{total_capacity.round(2)} GW\nin 2024', ha='center', va='center', fontsize=12, color='black')


# Draw the pie chart as a circle
axs[1].axis('equal')

plt.subplots_adjust(right=0.8)

plt.show()

Solar with battery storage will be the future of electric generation.

Lead of Clean Energy - Texas as an Example

Elctric generation in one day in Texas

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd

#| vscode: {languageId: python}
HEGM = pd.read_excel('../data/Region_TEX.xlsx', sheet_name="Hourly Charts", header=1)

#| vscode: {languageId: python}
HEGM = HEGM[HEGM["Local time"] > "2024-04-10 00:00:00"]
HEGM = HEGM[HEGM["Local time"] < "2024-04-17 00:00:00"]
Hourly = HEGM[["Hour", "Demand", "Net generation", "Coal", "Natural gas", "Petroleum", "Hydro", "Solar", "Wind", "Other"]]
Hourly.dropna(inplace=True)
data = Hourly.groupby("Hour").mean().round(1)
data.reset_index(inplace=True)
data["all other"] = data["Coal"] + data["Natural gas"] + data["Petroleum"] + data["Other"] + data["Hydro"]
hours = data['Hour']
energy_sources = data[['all other', 'Wind', 'Solar']]
plt.stackplot(hours, energy_sources.T, labels=energy_sources.columns, colors=["gray", "lightblue", "orange"], alpha=1)
plt.title('daily mean data from 2024.4.10 to 4.16')
plt.xlabel('Hour of Day')
plt.ylabel('Energy Generation (MWh)')
plt.xlim([1, 24])
plt.xticks([1, 6, 12, 18], ["mid night","6 am", "noon", "6 pm"])
plt.grid(axis="x")
plt.ylim([0, 60000])
plt.tight_layout()
plt.legend(frameon=False, loc='upper left', labelcolor = "linecolor")
plt.show()

  • Solar Energy provide a significant portion of the total energy generation in Texas.
  • However, the Solar Energy is highly unstable.

Data source: U.S. Energy Information Administration, Hourly Electric Grid Monitor

Note: Other fuels include coal, natural gas, hydropower, and nuclear. Utility-scale solar only. Winter is the full months of December, January, and February. ERCOT=Electric Reliability Council of Texas.

What is the backup for the Solar?

Code
HEGM = pd.read_excel('../data/Region_TEX.xlsx', sheet_name="Hourly Charts", header=1)
HEGM = HEGM[HEGM["Local time"] > "2024-04-7 00:00:00"]
HEGM = HEGM[HEGM["Local time"] < "2024-04-10 00:00:00"]
Hourly = HEGM[["Local time", "Net generation", "Coal", "Natural gas", "Petroleum", "Hydro", "Solar", "Wind", "Other"]]
Hourly.dropna(inplace=True)
data = Hourly
data.reset_index(inplace=True)

#| vscode: {languageId: python}
data["all other"] = data["Coal"] + data["Wind"] + data["Petroleum"] + data["Other"] + data["Hydro"]
data["sum"] = data["all other"] + data["Solar"] + data["Natural gas"]
energy_sources = data[['sum', 'Natural gas', 'Solar']]
plt.figure(figsize=(8, 3))


plt.fill_between(data["Local time"], 0, data["sum"], color="gray", label="Total Generation", alpha=0.5)
plt.plot(data["Local time"], data["Solar"], color="orange", label="Solar Generation")
plt.plot(data["Local time"], data["Natural gas"], color="tomato", label="Natural Gas Generation")
plt.title('ERCOT (Texas) hourly electricity generation (midnight Apr 7, 2024 – midnight April 10, 2024)')
plt.ylabel('Energy Generation (MWh)')
plt.ylim([0, 60000])
plt.grid(axis="x")
plt.xticks([pd.Timestamp('2024-04-07 12:00:00'), pd.Timestamp('2024-04-08 12:00:00'), pd.Timestamp('2024-04-09 12:00:00')], ["4.7", "4.8", "4.9"])
# plt.xlim("2024-04-7 00:00:00", "2024-04-10 00:00:00")
plt.xlabel('Date')
plt.tight_layout()
plt.legend(frameon=False, loc='upper left', labelcolor = "linecolor")
plt.show()

Data source: U.S. Energy Information Administration, Hourly Electric Grid Monitor

On April 8, 2024, a total solar eclipse caused a significant, albeit brief, reduction in sunlight reaching utility-scale solar electric generation plants across its path from Texas to Maine. The impact was particularly pronounced in Texas due to the high amount of solar capacity located within the path of totality.

The Electric Reliability Council of Texas (ERCOT), the key balancing authority for the state, experienced a loss of around 8.9 gigawatts (GW) of solar capacity during the eclipse according to our Hourly Electric Grid Monitor. The decline in solar generation began at 12:20 p.m. central time (CT), with the eclipse concluding in Texas at 3:07 p.m. CT.

In response, the majority of the shortfall in solar generation within ERCOT was compensated for by natural gas-fired generation, which accounted for roughly 80% of the replacement generation on April 8. The EIA’s Hourly Electric Grid Monitor, capturing grid activity over wider time intervals than the ERCOT-specific data, indicated that natural gas power plants ramped up production by an extra 6.2 GW between 1 p.m. CT and 2 p.m. CT, the peak period of the eclipse, to make up for the deficit in solar power. Coal and other sources, predominantly battery storage, contributed an additional 0.8 GW each to help mitigate the impact.

Typically, solar power is the second-largest source of energy in ERCOT during the afternoon hours, following natural gas. On the day of the eclipse, solar generation in Texas was notably lower than the previous day, April 7, and this reduction persisted into April 9 due to continued cloudy weather.

Electric Generation yearly trend in Texas

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go


raw = pd.read_excel('../data/Region_TEX.xlsx', sheet_name="Daily Charts", header=1)

raw = raw[raw["Local date"] > "2023-05-1"]
raw = raw[raw["Local date"] < "2024-04-1"]

daily = raw[["Local date", "Demand", "Net generation", "Coal", "Natural gas", "Petroleum", "Hydro", "Solar", "Wind", "Other"]].dropna()

daily.to_csv('../data/daily.csv', index=False)

daily["all other"] = daily["Coal"] + daily["Natural gas"] + daily["Petroleum"] + daily["Other"] + daily["Hydro"]

data = daily.copy()
data['Local date'] = pd.to_datetime(data['Local date'])
generation_types_columns = ['all other', 'Wind', 'Solar']
data['YearMonth'] = data['Local date'].dt.to_period('M')
data = data.set_index('Local date')
monthly_data = data.groupby('YearMonth').sum()
monthly_generation_data = monthly_data[generation_types_columns]
monthly_generation_data.index = monthly_generation_data.index.to_timestamp()

plt.figure(figsize=(9, 5))

ax1 = plt.subplot(1, 2, 1)
ax1.stackplot(monthly_generation_data.index, monthly_generation_data.T, labels=generation_types_columns, colors=["gray", "lightblue", "orange"], alpha=0.8)
# plt.legend(loc='upper left')
ax1.set_xlim([pd.Timestamp('2023-05-01'), pd.Timestamp('2024-02-28')])
ax1.set_title('Monthly Generation Trend by Source')
ax1.set_xlabel('Month')
ax1.set_ylabel('Generation Monthly (MWh)')
ax1.grid(axis="x")
ax1.set_ylim([0, 60000000])
ax1.set_xticks(['2023-05','2023-08', '2023-11', '2024-02'], ["Spring", "Summer", "Fall", "Winter"])
ax1.legend(frameon=False, loc='upper right', labelcolor = "linecolor", )


ax2 = plt.subplot(1, 2, 2)
total_generation = data[generation_types_columns].sum()
total_generation['Other'] = total_generation.sum() - total_generation['Solar'] - total_generation['Wind']

pie_chart_data = total_generation[['Solar', 'Wind', 'Other']]
ax2.pie(pie_chart_data, labels=pie_chart_data.index, autopct='%1.1f%%', startangle=0, colors=['orange', 'lightblue', 'gray'])
ax2.set_title('Percentage of Solar, Wind, and Other Energy Sources')
plt.tight_layout()
plt.show()

  • Solar power provide a significant portion of the total energy generation in Texas.
  • However, it is obviously not the domminiot source of electricity because of its unstablity.

What can we expect clean energy influence on us?

EV sales price

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
import geopandas as gpd
import plotly.graph_objects as go
from plotly.subplots import make_subplots

usa = gpd.read_file("./../data/cb_2018_us_state_5m/cb_2018_us_state_5m.shp")

fuelev = pd.read_csv("../data/Average_retail_price_of_electricity.csv", skiprows=5)

fuelev["State"] = fuelev["Unnamed: 0"].str.slice(3, 5)
melted_data = pd.melt(fuelev, id_vars=['State'], value_vars=[col for col in fuelev.columns if col.isdigit()], var_name='YearMonth', value_name='price')


plotly_map = usa.merge(melted_data, left_on='STUSPS', right_on='State')
plotly_map = plotly_map[~plotly_map["State"].isin(["AK", "HI"])]


df = pd.read_csv("../data/MER_T01_01.csv")

descriptions = [
    "Total Fossil Fuels Production",
    "Total Renewable Energy Production",
    "Nuclear Electric Power Production"
]
filtered_data = df[(df['Description'].isin(descriptions)) & (~df['YYYYMM'].astype(str).str.endswith('13'))]

pivot_data = filtered_data.pivot_table(index='YYYYMM', columns='Description', values='Value', aggfunc='sum')

pivot_data.reset_index(inplace=True)

pivot_data.columns = ['YearMonth', 'Nuclear', 'Fossil Fuels', 'Renewable']

pivot_data['YearMonth'] = pivot_data['YearMonth'].astype(str)

# pivot_data[pivot_data['YearMonth'].isin(unique_months)].reset_index(drop=True)





fig = make_subplots(
    rows=2, cols=2,
    subplot_titles=("Electricity Prices", "Electirc Produced Sources", "Electric Produced Sources Over Last 6 Months"),
    specs=[[{"type": "choropleth", "colspan": 2}, None],
           [{"type": "bar"}, {"type": "scatter"}]],
    column_widths=[0.5, 0.5],
    row_heights=[0.66, 0.34]
)

color_scale = ["#fcffa4", "#bc3754", "#000004"]
bar_colors = ['#1f77b4', '#ff7f0e', '#2ca02c']
line_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728']

unique_months = sorted(melted_data['YearMonth'].unique())
start_ym = '202301'
max_y = pivot_data[['Nuclear', 'Fossil Fuels', 'Renewable']].max().max()
min_price = plotly_map['price'].min()
max_price = plotly_map['price'].max()


def get_last_6_months_data(month, df):
    month_index = df[df['YearMonth'] == month].index[0]
    start_index = max(0, month_index - 5)
    return df.iloc[start_index:month_index+1]


for ym in unique_months:
    visible = (ym == start_ym)
    fig.add_trace(
        go.Choropleth(
            locations=plotly_map['State'].unique(),
            z=plotly_map[plotly_map['YearMonth'] == ym]['price'],  # or any other variable
            locationmode='USA-states',
            visible=visible,
            zmin=min_price,
            zmax=max_price,
            colorscale=color_scale,
        ),
        row=1, col=1
    )

    if ym in pivot_data['YearMonth'].values:
        month_data = pivot_data[pivot_data['YearMonth'] == ym]

        fig.add_trace(
            go.Bar(
                x=['Nuclear', 'Fossil Fuels', 'Renewable'],
                y=[month_data['Nuclear'].values[0], month_data['Fossil Fuels'].values[0], month_data['Renewable'].values[0]],
                visible=visible,
                marker_color=bar_colors,
                showlegend=False
            ),
            row=2, col=1
        )

        fig.update_yaxes(range=[0, max_y], row=2, col=1)

    last_6_months_data = get_last_6_months_data(ym, pivot_data)
    for energy_type, color in zip(['Nuclear', 'Fossil Fuels', 'Renewable'], line_colors):
        fig.add_trace(
            go.Scatter(
                x=last_6_months_data['YearMonth'],
                y=last_6_months_data[energy_type],
                mode='lines+markers',
                name=energy_type,
                line=dict(color=color),
                visible=visible,
                showlegend=False
            ),
            row=2, col=2
        )

        fig.update_yaxes(range=[0, max_y], row=2, col=2)

steps = []
for i, ym in enumerate(unique_months):
    step_visible = [False] * (len(unique_months) * 5)  # 5 traces per month (1 map, 1 bar, 3 lines)
    for j in range(5):
        step_visible[i * 5 + j] = True
    
    steps.append({
        'method': 'update',
        'args': [{'visible': step_visible}],
        'label': ym
    })


sliders = [{
    'active': unique_months.index(start_ym),
    'currentvalue': {'prefix': 'YearMonth: '},
    'steps': steps
}]

fig.update_layout(
    width=880, 
    height=800,
    margin=dict(l=20, r=20, t=50, b=20),
    sliders=sliders,
    title="Electricity Retail Price by State Over Time",
    geo_scope='usa',
)

fig.show()

Data source: U.S. Energy Information Administration, SHORT-TERM ENERGY OUTLOOK DATA BROWSER

The map shows the average price of electricity in the U.S. from 2001 to 2024. The price of electricity is measured in cents per kilowatt-hour (kWh). The price of electricity varies across the U.S. due to differences in generation sources, fuel costs, and regional policies.

The price of electricity in the U.S. has generally increased over the past two decades, driven by rising fuel costs, infrastructure investments, and changes in energy policy. However, the price of electricity varies widely across states, with some regions experiencing higher prices due to factors such as limited fuel sources, transmission constraints, and regulatory requirements. Policymakers and stakeholders are exploring ways to reduce the cost of electricity, such as investing in renewable energy sources, improving grid infrastructure, and implementing pricing incentives for EV charging.

Conclusion

  • This report evaluates the progress of the United States in the future of clean energy, with a focus on significant growth in renewable energy, particularly solar and battery storage, as well as a corresponding decrease in fossil fuel-based power generation. With a significant reduction in dependence on fossil fuels and an increase in renewable energy, energy production in the United States is diversifying. This transformation is driven by technological progress and policy directives.
  • According to EIA’s forecast data, it is expected that renewable energy, especially solar and wind energy, will drive most of the growth of the US power sector by 2025 and beyond, reflecting the transformation and transformation of the energy industry.
  • The report cited the possibility of promoting clean energy in the United States by using Texas’s new energy layout and supplementary plans as an example. Subsequently, the impact of using clean energy to replace traditional fossil fuel power generation on residents was introduced from a price perspective.
  • The United States is on a path toward a more sustainable energy future, characterized by rapid growth in renewable energy production and a significant decrease in dependence on fossil fuels. Continuous innovation and supportive policies are crucial for maintaining this momentum.

References

Total Energy:

  • https://www.eia.gov/totalenergy/data/browser

Short Term Energy Outlook:

  • https://www.eia.gov/outlooks/steo/data.php

Slides Texas & What is the backup plan:

  • https://www.eia.gov/todayinenergy/detail.php?id=61824

Slides Electric Price Map:

  • https://www.eia.gov/electricity/data/browser/#/topic/7

  • https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html